package com.zidongxiangxi.rabbit.producer.entity;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.connection.CorrelationData;
import org.springframework.amqp.rabbit.core.RabbitTemplate;

/**
 * RabbitMQ发送信息
 *
 * @author chenxudong
 * @date 2020/11/07
 */
public class RabbitMessageInfo {
	/**
	 * mq发送的相关信息
	 */
	private Producer producer;

	/**
	 * rabbit模版类
	 */
	private RabbitTemplate rabbitTemplate;

	/**
	 * 交换器
	 */
	private String exchange;

	/**
	 * 路由key
	 */
	private String routingKey;

	/**
	 * mq消息
	 */
	private Message message;

	/**
	 * 关联数据
	 */
	private CorrelationData correlationData;

	public RabbitMessageInfo(Producer producer, RabbitTemplate rabbitTemplate, String exchange, String routingKey,
							 Message message, CorrelationData correlationData) {
		this.producer = producer;
		this.rabbitTemplate = rabbitTemplate;
		this.exchange = exchange;
		this.routingKey = routingKey;
		this.message = message;
		this.correlationData = correlationData;
	}

	public Producer getProducer() {
		return producer;
	}

	public void setProducer(Producer producer) {
		this.producer = producer;
	}

	public RabbitTemplate getRabbitTemplate() {
		return rabbitTemplate;
	}

	public void setRabbitTemplate(RabbitTemplate rabbitTemplate) {
		this.rabbitTemplate = rabbitTemplate;
	}

	public String getExchange() {
		return exchange;
	}

	public void setExchange(String exchange) {
		this.exchange = exchange;
	}

	public String getRoutingKey() {
		return routingKey;
	}

	public void setRoutingKey(String routingKey) {
		this.routingKey = routingKey;
	}

	public Message getMessage() {
		return message;
	}

	public void setMessage(Message message) {
		this.message = message;
	}

	public CorrelationData getCorrelationData() {
		return correlationData;
	}

	public void setCorrelationData(CorrelationData correlationData) {
		this.correlationData = correlationData;
	}
}
